package com.jeeos.modules.system.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeos.modules.system.user.domain.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
    /**
     * 根据用户名查询用户信息
     * @param userName 用户名
     * @return
     */
    @Select("select * from dept where name like #{userName}")
    SysUser getUserByLoginName(@Param("userName")String userName);

    /**
     * 根据邮箱查询用户信息
     * @param email
     * @return
     */
    @Select("select * from dept where email like #{email}")
    SysUser getUserByEmail(@Param("email")String email);

    /**
     * 根据手机号查询用户信息
     * @param phoneNumber
     * @return
     */
    @Select("select * from dept where phone_number like #{phoneNumber}")
    SysUser getUserByPhoneNumber(@Param("phoneNumber")String phoneNumber);
}
